{% extends 'base.html' %}
{% load staticfiles %}
{% block custom_css %}
    <link rel="stylesheet" type="text/css" href="{% static '' %}css/muke/base.css"/>
    <link rel="stylesheet" type="text/css" href="{% static '' %}css/muke/common-less.css"/>
    <link rel="stylesheet" type="text/css" href="{% static '' %}css/muke/course/learn-less.css"/>
    <link rel="stylesheet" type="text/css" href="{% static '' %}css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="{% static '' %}css/mooc.css"/>
    <link rel="stylesheet" type="text/css" href="{% static '' %}css/muke/course/common-less.css">
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">

{% endblock %}
{% block title %}
    讨论详情 - 慕学在线网
{% endblock %}
{% block custom_bread %}
    <section>
        <div class="wp">
            <div class="crumbs">
                <ul>
                    <li><a href="{% url 'index' %}">首页</a>></li>
                    <li><a href="{% url 'course:list' %}">公开课程</a>></li>
                    <li><a href="{% url 'course:detail' course.id %}">课程详情</a>></li>
                    <li>课程讨论</li>
                </ul>
            </div>
        </div>
    </section>
{% endblock %}

{% block content %}

    <div id="main">
        <div class="course-infos">
            <div class="w pr">
                <div style="height: 15px" class="path">
                </div>
                <div class="hd">
                    <h2 class="l">{{ course.name }}</h2>
                </div>
                <div class="statics clearfix">
                    <div class="static-item ">
                        <span class="meta-value"><strong>{{ course.get_degree_display }}</strong></span>
                        <span class="meta">难度</span>
                        <em></em>
                    </div>
                    <div class="static-item static-time">
                        <span class="meta-value">{{ course.learn_times }}分钟</span>
                        <span class="meta">时长</span>
                        <em></em>
                    </div>
                    <div class="static-item">
                        <span class="meta-value"><strong>{{ course.students }}</strong></span>
                        <span class="meta">学习人数</span>
                        <em></em>
                    </div>
                </div>
            </div>
        </div>
        <div class="course-info-main clearfix w has-progress">

            <div class="info-bar clearfix">
                <div class="content-wrap clearfix">
                    <div class="content">
                        <div class="mod-tab-menu">
                            <ul class="course-menu clearfix">
                                <li><a class="ui-tabs-active " id="learnOn"
                                       href="{% url 'course:lesson' course.id %}"><span>章节</span></a></li>
                                <li><a id="commentOn" href="{% url 'course:comments' course.id %}"><span>评论</span></a>
                                </li>
                                <li><a class="active" href="{% url 'course:discuss' course.id %}"><span>讨论</span></a>
                                </li>
                                <li><a href="{% url 'course:homework' course.id %}"><span>作业</span></a></li>
                            </ul>
                        </div>


                        <div class="mod-chapters">
                            {% for item in course.discuss_all %}
                                <div class="chapter chapter-active">
                                    <h3>
                                        <strong><i class="state-expand"></i><a
                                                href="{% url  'course:discuss_detail' course.id  item.id %}">{{ item.title }}</a>
                                            <span class="fa fa-eye" aria-hidden="true"
                                                  style="position: relative;top: 15px"> {{ item.read_nums }}
                                       <i class="fa fa-comment" aria-hidden="true">{{ item.conment_nums }}</i></span>
                                        </strong>
                                    </h3>
                                </div>
                            {% endfor %}

                        </div>

                    </div>
                    <div class="aside r">
                        <div class="bd">

                            <div class="box mb40">
                                <h4>资料下载</h4>
                                <ul class="downlist">
                                    {% for resouse in course_resources %}
                                        <li>
                                            <span><i
                                                    class="aui-iconfont aui-icon-file"></i>&nbsp;&nbsp;{{ resouse.name }}</span>
                                            <a href="{{ resouse.download.url }}" class="downcode" target="_blank"
                                               download="" data-id="274" title="">下载</a>
                                        </li>
                                    {% endfor %}

                                </ul>
                            </div>
                            <div class="box mb40">
                                <h4>讲师提示</h4>
                                <div class="teacher-info">
                                    <a href="{% url 'org:teacher_detail'   course.teacher.id %}" target="_blank">
                                        <img src='{{ course.teacher.image.url }}' width='80' height='80'/>
                                    </a>
                                    <span class="tit">
          <a href="{% url 'org:teacher_detail'   course.teacher.id %}" target="_blank">{{ course.teacher.name }}</a>
        </span>
                                    <span class="job">{{ course.teacher.work_position }}</span>
                                </div>
                                <div class="course-info-tip">
                                    <dl class="first">
                                        <dt>课程须知</dt>
                                        <dd class="autowrap">{{ course.youneed_know }}</dd>
                                    </dl>
                                    <dl>
                                        <dt>老师告诉你能学到什么？</dt>
                                        <dd class="autowrap">{{ course.teacher_tell }}</dd>
                                    </dl>
                                </div>
                            </div>


                            <div class="cp-other-learned  js-comp-tabs">
                                <div class="cp-header clearfix">
                                    <h2 class="cp-tit l">该课的同学还学过</h2>
                                </div>
                                <div class="cp-body">
                                    <div class="cp-tab-pannel js-comp-tab-pannel" data-pannel="course"
                                         style="display: block">
                                        <!-- img 200 x 112 -->
                                        <!-- img 200 x 112 -->
                                        <ul class="other-list">
                                            {% for course in related_courses %}
                                                <li class="curr">
                                                    <a href="{% url 'course:detail' course.id %}" target="_blank">
                                                        <img src="{{ course.image.url }}" alt="{{ course.name }}">
                                                        <span class="name autowrap">{{ course.name }}</span>
                                                    </a>
                                                </li>
                                            {% endfor %}
                                        </ul>
                                    </div>

                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                <div class="clear"></div>

            </div>

        </div>
    </div>

{% endblock %}

